/**
 * 
 */
package Objetos;

import java.util.Hashtable;
import org.ksoap2.serialization.KvmSerializable;
import org.ksoap2.serialization.PropertyInfo;

/**
 * @author ARMGARCES
 *
 */
public class Telefono implements KvmSerializable{

	private String num;
	private String modelo;
	private String pin;
	private String so;
	/**
	 * 
	 */
	public Telefono() {	
	}
	/**
	 * 
	 */
	public String toString(){
		return num+"/"+modelo+"/"+pin+"/"+so;
	}
	/**
	 * @param num the num to set
	 */
	public void setNum(String num) {
		this.num = num;
	}
	/**
	 * @return the num
	 */
	public String getNum() {
		return num;
	}
	/**
	 * @param modelo the modelo to set
	 */
	public void setModelo(String modelo) {
		this.modelo = modelo;
	}
	/**
	 * @return the modelo
	 */
	public String getModelo() {
		return modelo;
	}
	/**
	 * @param pin the pin to set
	 */
	public void setPin(String pin) {
		this.pin = pin;
	}
	/**
	 * @return the pin
	 */
	public String getPin() {
		return pin;
	}
	/**
	 * @param so the so to set
	 */
	public void setSo(String so) {
		this.so = so;
	}
	/**
	 * @return the so
	 */
	public String getSo() {
		return so;
	}
    /**
     * 
     * 
     * @param index
     * @return  
     */
	public Object getProperty(int index) {
		// TODO Auto-generated method stub
		switch (index) {
	       case 0:
	           return getNum();
	       case 1:
	           return getModelo();
	       case 2:
	           return getPin();
	       case 3:
	           return getSo();

		}
		return null;
	}
	/**
	 * 
         * 
         * @return 
         */
	public int getPropertyCount() {
		// TODO Auto-generated method stub
		return 4;
	}
	/**
	 * 
         * 
         * @param index
         * @param properties 
         * @param info  
         */
	public void getPropertyInfo(int index, Hashtable properties, PropertyInfo info) {
		// TODO Auto-generated method stub
		switch (index) {
	       case 0:
	           info.type = PropertyInfo.STRING_CLASS;
	           info.name = "num";
	           break;
	       case 1:
	           info.type = PropertyInfo.STRING_CLASS;
	           info.name = "modelo";
	           break;
	       case 2:
	           info.type = PropertyInfo.STRING_CLASS;
	           info.name = "pin";
	           break;
	       case 3:
	           info.type = PropertyInfo.STRING_CLASS;
	           info.name = "so";
	           break;
		}
	}
	/**
	 * 
         * 
         * @param index
         * @param value  
         */
	public void setProperty(int index, Object value) {
		// TODO Auto-generated method stub
		switch(index) {
		    case 0:
		        setNum(value.toString());
		        break;
		    case 1:
		        setModelo(value.toString());
		        break;
		    case 2:
		        setPin(value.toString());
		        break;
		    case 3:
		        setSo(value.toString());
		        break;
		    default:
		        break;
		}
	}
}
